package org.grapes.wine.api.client.method.impl;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.grapes.wine.api.bean.GetLandscapeIntroductionBean;
import org.grapes.wine.api.client.exception.WineException;
import org.grapes.wine.api.method.EWineMethod;
import org.grapes.wine.api.method.iface.IMethodGetLandscapeIntroduction;
import org.xml.sax.SAXException;

public class MethodGetLandscapeIntroduction extends CallWineMethod implements
		IMethodGetLandscapeIntroduction {

	public MethodGetLandscapeIntroduction(String apiId, String sessionKey, String sig, String serverUrl) {
		super(apiId, sessionKey, sig, serverUrl);
		// TODO Auto-generated constructor stub
	}

	public String getLandscapeIntroduction(String landscapeName) {
		Map param = new HashMap();
		param.put("landscapeName", landscapeName);
		try {
			GetLandscapeIntroductionBean bean = (GetLandscapeIntroductionBean) callMethod(
					EWineMethod.GET_LANDSCAPE_INTRODUCTION, param);
			return bean.getLandscapeIntroduction();
		} catch (WineException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
}
